<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@include file="header.jsp"%>
<div class="container">
    <div class="grid-960">
        <!-- 支付订单详情 -->
        <jsp:include page="../content/orderDtl.jsp" flush="true"/>
        <div class="payment-mode">
            <div class="borderBox-3 posiRelative">
                <div class="set-language">
                    <div class="m-1">
                        <em class="smile marginRight20">恭喜您，订单支付成功！</em><span class="font14"><span class="color-c00" id="updateSec">10</span> 秒后返回商户页面</span>
                    </div>
                    <c:if test="${order.payChannel eq '02' or order.payChannel eq '52'}">
                        <div class="m-2 borderNone">
                            您现在可以： <a href="${portalUrl}/trans/index.shtml">查询订单状态</a>
                        </div>
                    </c:if>
                </div>
            </div>
            <div class="set-language-2">
                <button type="button" class="btn-2 marginTop20 marginLeft170"  onclick='notifyMer();'>返回商户页面</button>
            </div>
        </div>
    </div>
</div>
<script language='javascript' type='text/javascript'>
    var secs =10; //倒计时的秒数
    var notifyUrl = '${ctx}${notifyMerUrl}' ;
    $(function(){
        for(var i=secs;i>=0;i--){
            window.setTimeout('doUpdate(' + i + ')', (secs-i) * 1000);
        }
    });
    function doUpdate(num){
        $("#updateSec").html(num);
        if(num == 0) { notifyMer(); }
    }
    function notifyMer(){
        window.location.href=notifyUrl;
    }
</script>
<%@include file="footer.jsp"%>